<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title></title>
    </head>
    <body>
        <form action="<?PHP echo $_SERVER['PHP_SELF']; ?>" method="get">

        <input type="text" name="num1" value="0"/>
        <select name="operator">
            <option value="+">+</options>
            <option value="-">-</options>
            <option value="*">*</options>
            <option value="/">/</options>
        </select>
        <input type="text" name="num2" value="0"/>

        <input type="submit" name="submit" value="Calculate" />

        </form>
    <?php

        //print_r($_GET);
        

//echo date("M-d-Y h:i:s");

echo time();
        $num1=$_GET['num1'];
        $num2=$_GET['num2'];
        $sign=$_GET['operator'];
        if($sign=="+"){
             $total = $num1+$num2;
        }
        else if($sign=="-"){
            $total=$num1-$num2;
        }
        else if($sign=="*"){
            $total=$num1*$num2;
        }
        else if($sign=="/"){
            $total=$num1/$num2;
        }
        else{
            $total="ERROR";
        }
        echo $total;
        ?>
    </body>
</html>